import math
def create_point(x, y):
    return (x,y)

point1 = create_point(3, 4)
print(point1)

def unpack_point(point):
    return point[0],point[1]

x, y = unpack_point(point1)
print(f"x={x}, y={y}")

def distance_from_origin(point):
    x,y ==point[0],point[1]
    return math.sqrt(x **2 + y** 2)

dist = distance_from_origin(point1)
print(f"Distance:{dist:.2f}")

def create_rectangle(top_left, bottom_right):
    return (top_left,bottom_right)

def get_rectangle_dimensions(rectangle):
    bottom_right = rectangle [1]
    top_left = rectangle [0]
    width = bottom_right[0] - top_left[0]
    height = top_left[1] - bottom_right[1]
    return width, height

rect = create_rectangle((0, 10), (5, 0))
width, height = get_rectangle_dimensions(rect)
print(f"Width: {width}, Height: {height}")